Skip to content

Fix: Use PureWindowsPath to ensure that Windows paths are properly handled on POSIX - #20

Merged
ferrinm merged 1 commit into
ferrinm:mainfrom
psobolewskiPhD:fix/windows-url-separators
Sep 1, 2026
Merged

Fix: Use PureWindowsPath to ensure that Windows paths are properly handled on POSIX#20
ferrinm merged 1 commit into
ferrinm:mainfrom
psobolewskiPhD:fix/windows-url-separators

Conversation

@psobolewskiPhD

@psobolewskiPhD psobolewskiPhD commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

References and relevant issues

Part of: #18

Description

Our Phenix is connected to Windows machine and the users I support have XML files with:
<URL>r02c03\r02c03f07p19-ch01t01.tiff</URL>
Note the \ as the path separator.
If PyPhenix is used on macOS or linux, then the \ is read as part of the file name and no data is loaded.
This PR uses PureWindowsPath from pathlib to parse the relative path and then get the POSIX string.
The raw path was also used in the initial setup, so now that also goes through the image path helper.
With a bit of Claude I also added a minimal regression test that fails on main and passes with this branch.

@ferrinm
ferrinm merged commit 44d9190 into ferrinm:main Sep 1, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants